package com.huashi.dealer.commonEntity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 订单评价记录模型类
 * 对应PHP的Comment.php
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("yoshop_comment")
@Schema(description = "订单评价记录实体")
public class Comment extends BaseModel {

    /**
     * 评价ID
     */
    @TableId(value = "comment_id", type = IdType.AUTO)
    @Schema(description = "评价ID")
    private Long commentId;

    /**
     * 评分 (10好评 20中评 30差评)
     */
    @TableField("score")
    @Schema(description = "评分")
    private Integer score;

    /**
     * 评价内容
     */
    @TableField("content")
    @Schema(description = "评价内容")
    private String content;

    /**
     * 是否为图片评价
     */
    @TableField("is_picture")
    @Schema(description = "是否为图片评价")
    private Integer isPicture;

    /**
     * 评价排序
     */
    @TableField("sort")
    @Schema(description = "评价排序")
    private Integer sort;

    /**
     * 状态(0隐藏 1显示)
     */
    @TableField("status")
    @Schema(description = "状态")
    private Integer status;

    /**
     * 用户ID
     */
    @TableField("user_id")
    @Schema(description = "用户ID")
    private Long userId;

    /**
     * 订单ID
     */
    @TableField("order_id")
    @Schema(description = "订单ID")
    private Long orderId;

    /**
     * 商品ID
     */
    @TableField("goods_id")
    @Schema(description = "商品ID")
    private Long goodsId;

    /**
     * 订单商品ID
     */
    @TableField("order_goods_id")
    @Schema(description = "订单商品ID")
    private Long orderGoodsId;


    /**
     * 软删除
     */
    @TableField("is_delete")
    @Schema(description = "软删除")
    @TableLogic
    private Integer isDelete;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @Schema(description = "创建时间")
    private Long createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @Schema(description = "更新时间")
    private Long updateTime;
} 